package com.weir.user.service.impl;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.weir.user.entity.User;
import com.weir.user.service.api.UserService;
@RestController
public class UserServiceImpl implements UserService{

	@Value("${server.port}")
	private String serverPort;
	@Override
	@RequestMapping("/get")
	public User get(@RequestParam("id") Integer id) {
		try {
			Thread.sleep(5000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		User user = new User();
		user.setEmail("634623907@qq.com");
		user.setId(id);
		user.setName("weir");
		user.setPwd("123456");
		user.setServerPort(serverPort);
		return user;
	}
}
